/*
 * @Author: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @Date: 2025-08-28 16:46:00
 * @LastEditors: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @LastEditTime: 2025-10-28 14:36:21
 * @FilePath: \keep_motion_api\routes\admin\permission.route.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @Date: 2025-07-02 09:19:38
 * @LastEditors: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @LastEditTime: 2025-08-31 19:33:04
 * @FilePath: \keep_motion_api\routes\sys.route.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express');
const router = express.Router();

const { menu, permission, role, admin, log } = require('@/controllers/admin/permission');


// 菜单管理
router.get('/menu', menu.getMenu);
router.post('/menu', menu.createMenu);
router.put('/menu/:id', menu.updateMenu);
router.delete('/menu/:id', menu.deleteMenu);
router.get('/menu/path', menu.getPath);

// 权限管理 
router.get('/permissions', permission.getPermission);
router.post('/permissions', permission.syncMenuToPermission);
router.post('/permissions/bind', permission.bindPermission);

// 角色管理
router.get('/roles', role.getRole);
router.post('/roles', role.createRole);
router.put('/roles/:id', role.updateRolePermission);
router.delete('/roles/:id', role.deleteRole);

// 人员管理
router.get('/admins', admin.getAdmin);
router.post('/admins', admin.createAdmin);
router.put('/admins/:id', admin.updateAdmin);
router.put('/admins/status/:id', admin.updateAdminStatus);

// 操作日志管理
router.get('/audit-logs', log.getLogs);
router.delete('/audit-logs/:id', log.deleteLog);
router.get('/audit-logs/export', log.exportLogs);



 

module.exports = router;

